import java.util.Scanner;

public class ArrInput {
    public static void main(String[] args){
        int[] arr=new int[20];
        int input=0,sum=0;
        System.out.println("开始输入：");
        while (input<20){
            Scanner reader=new Scanner(System.in);
            arr[input]= reader.nextInt();
            sum+=arr[input];
            System.out.println("第"+(input+1)+"个数字是："+arr[input]);
            input++;
        }
        System.out.println("sum的值为："+sum);
    }
}
